import { createApp } from 'vue'
//引入pinia
import {createPinia} from "pinia";
//引入pinia插件
import persistedstate from 'pinia-plugin-persistedstate'
import App from './App.vue'
//路由.自动寻找文件夹中的index.js
import router from "./router";

import 'element-plus/dist/index.css'
// 导入 Element-Plus插件
import ElementPlus from 'element-plus'
//element-plus 全局 国际化插件
import zhCn from 'element-plus/dist/locale/zh-cn.mjs'
//element-plus 图标插件
import * as ElementPlusIconsVue from '@element-plus/icons-vue'

import './assets/css/bootstrap.min.css'
import './assets/css/animate.min.css'
import './assets/css/remixicon.css'
import './assets/css/flaticon.css'
import './assets/css/jquery-ui.min.css'
import './assets/css/magnific-popup.min.css'
import './assets/css/simplebar.min.css'
import './assets/css/metismenu.min.css'
import './assets/css/owl.carousel.min.css'
import './assets/css/owl.theme.default.min.css'
import './assets/css/style.css'
import './assets/css/responsive.css'
import './assets/css/index.css'

const app = createApp(App);

// 创建 Pinia 实例并挂载到应用
const pinia = createPinia();
pinia.use(persistedstate)
app.use(pinia)
//路由
app.use(router);
//配置 elementplus的插件
for (const [key, component] of Object.entries(ElementPlusIconsVue)) {
    app.component(key, component)
}
app.use(ElementPlus, {
    locale: zhCn,
})

app.mount('#app')

